home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_17427.txt < prev    next >
Text File  |  1991-02-27  |  886b  |  23 lines

  1. -- card: 17427 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10.     int     id_number;
  11.  
  12.     void    set(void);
  13.     void    print(void);
  14.  
  15. The Student class contains one additional instance variable, the id_number.  Again, since Student is derived from Person, Student objects will have age and weight instance variables without need to redeclare them here.
  16.  
  17. Since the set() and print() methods are redeclared in the Student definition, they          "override" the Person's definition of these methods, and will require new definitions.
  18.  
  19. If these declarations had been ommitted, then objects of type Student would still accept set and print messages but would use the definitions for these functions provided for the Person base class.
  20.  
  21. -- part contents for background part 7
  22. ----- text -----
  23. 44